/*
 * Declaration.cpp
 *
 *  Created on: 05/05/2010
 *      Author: rodolfo
 */

#include "Declaration.h"

Declaration::Declaration() :
        Expression ( decExp )
{

}

Declaration::~Declaration()
{
	if(identifierList != 0 ){
		std::vector<Identifier*>::iterator it = identifierList->begin();
		while ( it != identifierList->end() ){
			delete *it;
			it++;
		}
		identifierList->clear();
	}
}

Declaration::Declaration ( char type, std::vector<Identifier*> *identifierList ) :
        type ( type ), identifierList ( identifierList ), Expression ( decExp )
{
}
